using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Xml;
using System.Xml.XPath;

namespace Umbraco.Ecommerce.StoreAdminstration
{
	/// <summary>
	/// Summary description for WebForm1.
	/// </summary>
	public class Store : umbraco.BasePages.UmbracoEnsuredPage
	{
		protected System.Web.UI.WebControls.TextBox shopname;
		protected System.Web.UI.WebControls.DropDownList paymentGatewayType;
		protected umbraco.uicontrols.UmbracoPanel UmbracoPanel1;
		protected System.Web.UI.WebControls.CheckBox hasPaymentGateWay;
		protected System.Web.UI.WebControls.TextBox pgCustomerId;
	
		private void Page_Load(object sender, System.EventArgs e)
		{
			if (!IsPostBack) {
					paymentGatewayType.Enabled = false;
					pgCustomerId.Enabled = false;
				}

			UmbracoPanel1.hasMenu=true;
			UmbracoPanel1.Text = "Umbraco e-shop konfiguration";
		}

	
		#region Web Form Designer generated code
		override protected void OnInit(EventArgs e)
		{
			//
			// CODEGEN: This call is required by the ASP.NET Web Form Designer.
			//
			InitializeComponent();
			base.OnInit(e);
		}
		
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{   
			this.hasPaymentGateWay.CheckedChanged += new System.EventHandler(this.hasPaymentGateWay_CheckedChanged);
			this.Load += new System.EventHandler(this.Page_Load);

		}
		#endregion

		private void hasPaymentGateWay_CheckedChanged(object sender, System.EventArgs e)
		{
			if (hasPaymentGateWay.Checked) 
			{
				paymentGatewayType.Enabled = true;
				pgCustomerId.Enabled = true;
			} 
			else 
			{
				paymentGatewayType.Enabled = false;
				pgCustomerId.Enabled = false;
			}
		}
	}
}
